// package-store/pages/store-setting-bg/index.js
import { ManageTargetInfoUpdateMixins, ManageTargetInfoEditMixins } from '../../../behaviors/page';
import { DEFAULT_BG_LIST } from '../../../constants/common';

Page({
    mixins: [ManageTargetInfoUpdateMixins, ManageTargetInfoEditMixins],
    data: {
        list: [],
    },
    onLoad(options) {
        this.setData({
            list: DEFAULT_BG_LIST,
        });
    },
    async handleSave(e) {
        if (e.detail) {
            await this.manageTargetInfoUpdateAction({
                homepageBg: e.detail,
            });
        }
    },
})
